/*
** my_files.h for my_files in /home/comet_a//afs/local/sys_unix/my_ls/tp_stat
** 
** Made by alexandre comet
** Login   <comet_a@epitech.net>
** 
** Started on  Sat Dec  3 10:55:43 2011 alexandre comet
** Last update Sun Dec  4 13:59:19 2011 alexandre comet
*/

void		my_putchar(char c)
{
  write(1, &c, 1);
}

void            my_putstr(char *str)
{
  int           i;

  i = 0;
  while (str[i])
    my_putchar(str[i++]);
}

int		my_strlen(char *s)
{
  int		i;

  i = 0;
  while (s[i] != '\0')
    i++;;
  return (i);
}

int		my_strcmp(char *s1, char *s2)
{
  if (my_strlen(s1) > my_strlen(s2))
    return (1);
  if (my_strlen(s1) == my_strlen(s2))
    return (0);
  if (my_strlen(s1) < my_strlen(s2))
    return (-1);
  return (0);
}


void		my_put_nbr(int nb)
{
  if (nb < 0)
    {
      my_putchar('-');
      nb = nb * -1;
    }
  if (nb > 9)
    my_put_nbr(nb/10);

  my_putchar((nb % 10) + 48);
}

/* PROTOS */

void            my_putchar(char c);

void            my_putstr(char *str);

void            my_put_nbr(int nb);

int		no_options();

int		option_l();

int		option_a();

int		my_strcmp(char *s1, char *s2);

int		my_strlen(char *s);
